<div class="right_side_operate_area">
    <div class="left item_add_btn"><a href="javascript:;" id="write_msg">发信息</a></div>
    <?php  
        if($first_msg['Msg']['feedbacksShowpage']==1) {
            if(isset($paging)){ echo $this->renderElement('pagination',$paging);} 
        }
    ?>
</div>
<style>
#pagination{
    height: 35px;
    line-height: 35px;
}

#pagination .paging_pre_next{
margin-left: 12px;
margin-top: 5px;
}

</style>
<div class="right_side_scollbar_msg">
   
<?php if(!empty($first_msg['Msg']['id'])): ?>

<div style='float:left;margin:0 40px;width:92%;'>
  
  <div style='font-size:10pt;margin:10px 0;' >
  <span style="float:left;font-weight: bold;font-size:16px;"><?php echo ($first_msg['User']['name'])?>发给:&nbsp;&nbsp;</span>
  <div id="receiver" style="float:left;overflow:hidden;max-width:80%;font-weight: bold;font-size:16px;">
  <?php for($i=0;$i<count($first_msg['Msg']['id_ones']);$i++):?>
  
     <?php echo $html->link($first_msg['Msg']['id_ones'][$i]['name'].'; ',"/users/view/".$first_msg['Msg']['id_ones'][$i]['id']);?>

  <?php endfor;?>
  </div>
  <a class='show_receiver'  href='javascript:;' title='展开'></a>
  <a style='float:right;'><?php echo date('Y-m-d H:i',strtotime($first_msg['Msg']['created']));?></a>
  </div>
  <?php if(!empty($first_msg['Msg']['attachments'])): ?>
   
  <div style='font-size:10pt;margin:10px 0;float:left;width:100%;'>附件:&nbsp;&nbsp;
   
    <?php for($i=0;$i<count($first_msg['Msg']['attachments']);$i++):?>

     <?php echo $html->link($first_msg['Msg']['attachments'][$i]['Attachment']['file_name'].'; ',"/msgs/download/".$first_msg['Msg']['attachments'][$i]['Attachment']['id']);?>

    <?php endfor;?>
     </div>
     <?php endif;?>
     <div style='font-size:11pt;padding:10px 0;
     max-width:1100px;width:100%;word-wrap: break-word;overflow: hidden;'>
	  主题：<?php echo $first_msg['Msg']['subject'];?>
	  </div>
  <div style='font-size:11pt;padding:10px 0;border-bottom:1px solid #ccc;margin-bottom:10px;
  max-width:1100px;width:100%;word-wrap: break-word;overflow: hidden;'>
  内容：<?php echo $first_msg['Msg']['content'];?>
  </div>
  
  
  <?php 

  if(!empty($first_msg['Msg']['feedbacks'])){
  for($i=(count($first_msg['Msg']['feedbacks'])-1);$i>=0;$i--):?>
 
  <div style='font-size:10pt;padding:20px 0;border-bottom:1px dotted #ccc;float: left;width: 100%;'>
  	<?php 
  		$user=$session->read('User');
  		if ($user['id'] == $first_msg['Msg']['feedbacks'][$i]['User']['id']){
  			$color_style = 'color:#008040';
  		}else{
  			$color_style = 'color:#004298';
  		}
  	?>
    <?php echo $html->link($first_msg['Msg']['feedbacks'][$i]['User']['name'],"/users/view/".$first_msg['Msg']['feedbacks'][$i]['User']['id'],array("style"=>$color_style));?><a href='' class='right'><?php echo date('Y-m-d',strtotime($first_msg['Msg']['feedbacks'][$i]['Msg']['created']));?></a>
    <p style='font-size:11pt;text-indent:15px;'><?php echo $first_msg['Msg']['feedbacks'][$i]['Msg']['subject'];?></p>
    </div>
  <?php endfor;}?>
    
  <div style='font-size:11pt;width:720px;margin-top:30px;height:100%;float:left;overflow:hidden;' >
    <?php echo $form->create('Msg', array('action' => 'add','type'=> 'post','id' => 'feedbackform','name' => 'form','enctype'=>'multipart/form-data','onsubmit' => "return feedbackcheckinfo()") ); ?>
    <input type="hidden" name="feedback" value="<?php echo $first_msg['Msg']['id'];?>"></input>
    <?php for($i=0;$i<count($first_msg['Msg']['id_ones']);$i++):?>
    <input type="hidden" name="feed_users[]" value="<?php echo $first_msg['Msg']['id_ones'][$i]['id'];?>"></input>
   
   <?php endfor;
  
   ?>
    <h3 style='background:#bbb;color:#fff;width:100px;height:30px;line-height:30px;text-align:center;'>回&nbsp;&nbsp;&nbsp;&nbsp;复</h3>
    <textarea style='width:700px;height:180px;padding:8px;font-size:12pt;' id="feedback_msg" name="feedback_msg"></textarea><br/><br/>
    <div style='width:100%;float:left;'>
   
    <input id="submit_id"  type="submit" value="发&nbsp;&nbsp;送" style='float:right;background:#4298e5;width:100px;height:30px;border:0;font-size:12pt;color:#fff;cursor:pointer;' >
    </div>
    </div>

</div>
<?php else: ?>

<?php endif;?>

<div class="clear"></div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	hideReceiver();
});

function feedbackcheckinfo(){
          if($("#feedback_msg").val().trim() == ''){
           alert('请填写内容');
            return false;
          }
          
         
        
    }


/*$("#submit_id").click(function(){

     var options = {
            dataType: 'json',
            
            success: function(data){

            

            } };
        $('#feedbackform').ajaxSubmit(options);
        return false;
});*/

   
</script>